<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>props</title>
</head>

<body>
    <h1>props</h1>
    <ol>
    </ol>
    <hr />
    <div id="demoReact"></div>
</body>
<script src="../../node_modules/babel-standalone/babel.min.js"></script>
<script src="../../node_modules/react/umd/react.development.js"></script>
<script src="../../node_modules/react-dom/umd/react-dom.development.js"></script>
<script type="text/babel">

    function Com(props) {
        return (
            <div>
                <h2>我是一个无状态组件，外部传递的数据</h2>
                <p>传递姓名：{props.name}</p>
                <p>传递年龄：{props.age}</p>
                <p>传递性别：{props.sex}</p>
            </div>
        )
    }

    let sex = "男"

    let com = <Com name="奉先" age="35" sex={sex}/>

    ReactDOM.render(com, document.getElementById("demoReact"));

</script>

</html>